-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: remove duplication of functions in imp felt #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove duplication of functions in imp felt #106
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #106 +/- ##
==========================================
- Coverage 76.47% 76.39% -0.09%
==========================================
Files 25 25
Lines 884 881 -3
Branches 884 881 -3
==========================================
- Hits 676 673 -3
Misses 174 174
Partials 34 34 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @AvivYossef-starkware)
crates/committer/src/felt.rs
line 82 at r1 (raw file):
pub fn as_bytes(&self) -> [u8; 32] { self.0.to_bytes_be() }
I prefer the passthrough functions keep their name
Suggestion:
/// Parse a hex-encoded number into `Felt`.
pub(crate) fn from_hex(hex_string: &str) -> Result<Self, FromStrError> {
Ok(StarknetTypesFelt::from_hex(hex_string)?.into())
}
pub fn to_bytes_be(&self) -> [u8; 32] {
self.0.to_bytes_be()
}
b1ffded
to
90ed4e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 7 files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @dorimedini-starkware)
crates/committer/src/felt.rs
line 82 at r1 (raw file):
Previously, dorimedini-starkware wrote…
I prefer the passthrough functions keep their name
Ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 7 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @amosStarkware)
This change is